<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CsRolSub
 *
 * @author gangster
 */
require_once '../Control/CsCtrlData.php';
require_once '../Data/CsConexion.php';
class CsRolSub extends CsConexion {
    var $tabla;
    var $atributo;
    var $dato;
    var $ncol;
    var $nllave;
    
    function CsRolSub(){
        $this->tabla = "detalle_caso";
        $this->atributo[0] = "rolcod";
        $this->atributo[1] = "subcod";
        $this->ncol = 2;
        $this->nllave = 2;
    }
    
    function GuardarDato($cn){
        $objcontrol = new CsCtrlData();
        $sql = $objcontrol->Insert($this->tabla, $this->dato, $this->ncol);
        return $this->Transaccionx($sql,$cn);
    }
    
    function ActualizarDato($cn){
        $objcontrol = new CsCtrlData();
        $sql = $objcontrol->Update($this->tabla, $this->dato, $this->atributo, $this->ncol, $this->nllave);
        return $this->Transaccionx($sql, $cn);
    }
    
    function EliminarDato($cn){
        $objcontrol = new CsCtrlData();
        $sql = $objcontrol->Delete($this->tabla, $this->dato, $this->atributo, $this->nllave);
        return $this->Transaccionx($sql, $cn);
    }
}

?>
